The present invention is directed to a sample rate converter, and more particularly, to a sampling rate converter with guaranteed accuracy up to a desired band limit.
Electronic devices frequently operate on a particular frequency, often set by industry standard. For example, CDs operate on a frequency of 44.1 kHz, digital audio tape at 48 kHz, 32 kHz for satellite broadcasting, etc. It has become increasingly desirable to have such electronic devices communicate with one another, such as (to cite but one of many examples) the case with downloading digital audio over the internet. Sampling (or sometimes resampling) is used in many electronic devices and systems to measure a continuous function at regular time intervals. Conversion of such signals enables the signals to be represented and processed digitally. Digital samples, represent the value of data at a regular time interval. The reciprocal of such a regular interval is known as a sampling rate, and is typically expressed in units of hertz or kilohertz (kHZ). Since each kind of electronic application generally has a different sampling rate, there is a need to convert sampling rates from a given input data stream to an output data stream which corresponds to the appropriate operating frequency of the current electronic application. For example, the 44.1 kHz sampling rate of an audio CD might be upsampled to 96 kHz or 192 kHz for playing on a DVD audio player.
Resampling can be done in either analog or digital fashion. In an analog fashion, the digital signal is converted to an analog signal, subsequently filtered and finally resampled at the new sampling rate. This method typically results in audio artifacts and/or limited frequency content in the resulting signal. When done in a digital fashion, existing methods include, but are not limited to, approximation by segmented polynomial functions and polyphase filters. See for example, U.S. Pat. No. 5,818,888 to Holmqvist.
While known sample rate converters with polyphase filters try to maintain the accuracy of the samples received, problems can arise in that although the interpolated signal points would be accurately spaced apart there is no guarantee that the interpolated signal points will reflect the input signal amplitude with a desired degree of accuracy. That is, the error is forced into the system by the method of resampling. It would be desirable to develop a method of resampling input data streams such that the error could be preselected for a given band limit, depending on the requirements of the electronic application.
Further, some electronic devices have limited memory capabilities in their digital signal processors (DSPs) which places a premium on computational efficiency, and/or increased demand requirements as more input data streams are transferred between electronic devices. It would be desirable to have a sample rate converter which provides high accuracy and which can be predetermined for a given electronic application, while also having low computational cost associated with such digital resampling.
In accordance with a first aspect, a sample rate converter method for converting an input data stream having an input sample rate to an output data stream having a desired output sample rate with a preselected accuracy up to a given band limit, comprises constructing a cascading filter system with each stage having one or more filters, and each filter having a filter length such that the cascading filter system meets the preselected accuracy of the desired output sample rate, and each filter is constructed in the space of band limited functions, and convolving the input data stream with the cascading filter system to generate the output data stream with the desired output sample rate. Preferably the band limited functions are prolate spheroidal wave functions.
In accordance with another aspect, a method of converting an input data stream consisting of values sampled from a band limited function at an input sampling rate, to an output data stream consisting of values of the same band limited function at a desired output sample rate with a preselected accuracy, comprises receiving the input data stream at the input sample rate and comparing the input sample rate with the Nyquist frequency of the band limited function, constructing a cascading filter system having one or more filters, each filter having a filter length based on (i) the preselected accuracy of the desired output sample rate, and (ii) the amount the input sample rate exceeds the Nyquist frequency of the band limited function; and convolving the input data stream with the cascading filter system to generate the output data stream with the desired output sample rate.
In accordance with another aspect, a sampling rate converter for converting an input data stream at an input sample rate to an output data stream at an output sample rate with a preselected accuracy comprises means for receiving the input sample and a cascading filter system having one or more filters, each filter having a filter length such that the cascading filter system meets the preselected accuracy of the desired output sample rate, and each filter is constructed in the space of band limited functions, wherein the cascading filter system convolves the input data stream with the one or more filters to generate the output data stream with the desired output sample rate.
From the foregoing disclosure and the following more detailed description of various preferred embodiments it will be apparent to those skilled in the art that the present invention provides a significant advance in the technology and art of sample rate converters. Particularly significant in this regard is the potential the invention affords for new and improved applications of signal conversion, such as distribution of high quality audio on the internet. Additional features and advantages of various preferred embodiments will be better understood in view of the detailed description provided below.